-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add flexible schema mapping POC #3635
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 9681982895Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9742975006Details
💛 - Coveralls |
if (getValueLines.Length == 0) | ||
{ | ||
getValueBody = @"throw new MissingMemberException($""The object does not have a gettable Realm property with name {propertyName}"");"; | ||
} | ||
else | ||
{ | ||
getValueBody = $@"return propertyName switch | ||
{{ | ||
{getValueLines.Indent(trimNewLines: true)} | ||
_ => throw new MissingMemberException($""The object does not have a gettable Realm property with name {{propertyName}}""), | ||
}};"; | ||
} |
Check notice
Code scanning / CodeQL
Missed ternary opportunity Note
if (setValueLines.Length == 0) | ||
{ | ||
setValueBody = @"throw new MissingMemberException($""The object does not have a settable Realm property with name {propertyName}"");"; | ||
} | ||
else | ||
{ | ||
setValueBody = $@"switch (propertyName) | ||
{{ | ||
{setValueLines.Indent(trimNewLines: true)} | ||
default: | ||
throw new MissingMemberException($""The object does not have a settable Realm property with name {{propertyName}}""); | ||
}}"; | ||
} |
Check notice
Code scanning / CodeQL
Missed ternary opportunity Note
if (getListValueLines.Length == 0) | ||
{ | ||
getListValueBody = @"throw new MissingMemberException($""The object does not have a Realm list property with name {propertyName}"");"; | ||
} | ||
else | ||
{ | ||
getListValueBody = $@"return propertyName switch | ||
{{ | ||
{getListValueLines.Indent(trimNewLines: true)} | ||
_ => throw new MissingMemberException($""The object does not have a Realm list property with name {{propertyName}}""), | ||
}};"; | ||
} |
Check notice
Code scanning / CodeQL
Missed ternary opportunity Note
if (getSetValueLines.Length == 0) | ||
{ | ||
getSetValueBody = @"throw new MissingMemberException($""The object does not have a Realm set property with name {propertyName}"");"; | ||
} | ||
else | ||
{ | ||
getSetValueBody = $@"return propertyName switch | ||
{{ | ||
{getSetValueLines.Indent(trimNewLines: true)} | ||
_ => throw new MissingMemberException($""The object does not have a Realm set property with name {{propertyName}}""), | ||
}};"; | ||
} |
Check notice
Code scanning / CodeQL
Missed ternary opportunity Note
if (getDictionaryValueLines.Length == 0) | ||
{ | ||
getDictionaryValueBody = @"throw new MissingMemberException($""The object does not have a Realm dictionary property with name {propertyName}"");"; | ||
} | ||
else | ||
{ | ||
getDictionaryValueBody = $@"return propertyName switch | ||
{{ | ||
{getDictionaryValueLines.Indent(trimNewLines: true)} | ||
_ => throw new MissingMemberException($""The object does not have a Realm dictionary property with name {{propertyName}}""), | ||
}};"; | ||
} |
Check notice
Code scanning / CodeQL
Missed ternary opportunity Note
if (property.TypeInfo.IsBacklink) | ||
{ | ||
getFieldString = "GetBacklinks"; | ||
} | ||
else | ||
{ | ||
getFieldString = property.TypeInfo.CollectionType switch | ||
{ | ||
CollectionType.List => "GetListValue", | ||
CollectionType.Set => "GetSetValue", | ||
CollectionType.Dictionary => "GetDictionaryValue", | ||
_ => throw new NotImplementedException(), | ||
}; | ||
} |
Check notice
Code scanning / CodeQL
Missed ternary opportunity Note
Pull Request Test Coverage Report for Build 9875518284Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Notes doc
TODO:
Must-have
Nice to have